package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TOrderInfoMapper;
import com.ruoyi.order.domain.TOrderInfo;
import com.ruoyi.order.service.ITOrderInfoService;

/**
 * 订单列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-05
 */
@Service
public class TOrderInfoServiceImpl implements ITOrderInfoService 
{
    @Autowired
    private TOrderInfoMapper tOrderInfoMapper;

    /**
     * 查询订单列表
     * 
     * @param orderId 订单列表主键
     * @return 订单列表
     */
    @Override
    public TOrderInfo selectTOrderInfoByOrderId(Integer orderId)
    {
        return tOrderInfoMapper.selectTOrderInfoByOrderId(orderId);
    }

    /**
     * 查询订单列表列表
     * 
     * @param tOrderInfo 订单列表
     * @return 订单列表
     */
    @Override
    public List<TOrderInfo> selectTOrderInfoList(TOrderInfo tOrderInfo)
    {
        return tOrderInfoMapper.selectTOrderInfoList(tOrderInfo);
    }

    /**
     * 新增订单列表
     * 
     * @param tOrderInfo 订单列表
     * @return 结果
     */
    @Override
    public int insertTOrderInfo(TOrderInfo tOrderInfo)
    {
        tOrderInfo.setCreateTime(DateUtils.getNowDate());
        return tOrderInfoMapper.insertTOrderInfo(tOrderInfo);
    }

    /**
     * 修改订单列表
     * 
     * @param tOrderInfo 订单列表
     * @return 结果
     */
    @Override
    public int updateTOrderInfo(TOrderInfo tOrderInfo)
    {
        tOrderInfo.setUpdateTime(DateUtils.getNowDate());
        return tOrderInfoMapper.updateTOrderInfo(tOrderInfo);
    }

    /**
     * 批量删除订单列表
     * 
     * @param orderIds 需要删除的订单列表主键
     * @return 结果
     */
    @Override
    public int deleteTOrderInfoByOrderIds(Integer[] orderIds)
    {
        return tOrderInfoMapper.deleteTOrderInfoByOrderIds(orderIds);
    }

    /**
     * 删除订单列表信息
     * 
     * @param orderId 订单列表主键
     * @return 结果
     */
    @Override
    public int deleteTOrderInfoByOrderId(Integer orderId)
    {
        return tOrderInfoMapper.deleteTOrderInfoByOrderId(orderId);
    }
}
